// 导入axios实例
import httpRequest from '../request/index'


// 添加电影链接
export function addMovieLink(mlink) {
    return httpRequest({
        baseURL: '/admin',
        url: `/mlink/add`,
        method: 'post',
        data: mlink,
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}


// 删除电影链接
export function deleteMovieLink(id) {
    return httpRequest({
        baseURL: '/admin',
        url: `/mlink/${id}`,
        method: 'delete',
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}


// 编辑电影链接
export function editMovieLink(id, mlink) {
    return httpRequest({
        baseURL: '/admin',
        url: `/mlink/${id}`,
        method: 'put',
        data: mlink,
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}
